using Microsoft.EntityFrameworkCore;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Linq;

namespace UnitTest
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void TestMethod1()
        {
            var str = System.Convert.ToString(null);
            //Model.Entity.DBContext context = new Model.Entity.DBContext();
            //System.Console.WriteLine(System.Guid.NewGuid().ToString("N"));

            //context.User.Add(new Model.Entity.User()
            //{
            //    CreateTime = System.DateTime.Now,
            //    MemberId = System.Guid.NewGuid().ToString("N"),
            //    NickName = "�ٺٺ�",
            //    UserId = "zz123456",
            //    UserPwd = "zz123456",
            //    Avatar="123123"
            //});
            //context.SaveChanges();
            //context.Dispose();
            //using (Model.Entity.DBContext dbContext = new Model.Entity.DBContext())
            //{
            //}

            // var teble = MySqlDb.GetDataTable(@"SELECT
            //                     friends.*, `user`.nick_name,
            //                     `user`.avatar
            //                 FROM
            //                     friends
            //                 LEFT JOIN `user` ON friends.member_id = `user`.member_id
            //                 WHERE
            //                     friends.disabled = 0;", new MySql.Data.MySqlClient.MySqlParameter[] {
            // });
            // var ttt = teble.Rows[0];
            // //string str = (string)teble.Rows[0][0];
            // //for (int i = 0; i < teble.Columns.Count; i++)
            // //{
            // //    string str = (string)ttt[i];
            // //}
            // var model = new Model.ApiResult.FriendResult.FriendsList()
            // {
            //     NickName = (string)ttt["nick_name"],
            //     FriendRemark = ConvertHelper.ConverToAny<string>(ttt["friend_remark"]),
            // };
        }
    }
}
